package com.project.service.Impl;

import com.project.mapper.OrderMapper;
import com.project.pojo.Order;
import com.project.pojo.Ordercopy;
import com.project.service.OrderService;
import com.project.vo.InsuranceTravelVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService
{
    @Autowired
    OrderMapper orderMapper;
    @Override
    public int insert(Order order) {
        return orderMapper.insert(order);
    }

    @Override
    public int getOrderIdByUser(int userid, int type) {
        return orderMapper.getOrderIdByUser(userid,type);
    }

    @Override
    public int insertOrderCopy(Ordercopy ordercopy) {
        return orderMapper.insertOrderCopy(ordercopy);
    }

    @Override
    public InsuranceTravelVO getTravelOrderByIdAndType(int orderid) {
        return null;
    }

    @Override
    public Order getOrderById(int id) {
        return orderMapper.getOrderById(id);
    }

    @Override
    public int updateOrder(Order order) {
        return orderMapper.updateOrderByAdmin(order);
    }

    @Override
    public int insertOrder(Order order) {
        return orderMapper.insertOrder(order);
    }
}
